package com.lening.iot.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lening.common.base.BaseServiceImpl;
import com.lening.iot.dao.LacontrolDAO;
import com.lening.iot.dto.LacontrolDTO;
import com.lening.iot.po.LacontrolPO;
import com.lening.iot.service.LacontrolService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ToDo:
 * @Author：李忠达
 * @date: 2024/6/4 14:07
 */
@Service
public class LacontrolServiceImpl extends BaseServiceImpl<LacontrolDAO, LacontrolPO, LacontrolDTO> implements LacontrolService{
    @Autowired(required = false)
    private LacontrolDAO lacontrolDAO;
    @Override
    public Page<LacontrolDTO> getAllLa(Page<LacontrolDTO> lacontrolDTOPage) {
        Page<LacontrolDTO> laList = lacontrolDAO.getAllLa(lacontrolDTOPage);
        return laList;
    }

    @Override
    public List<LacontrolDTO> getAll(String communityname) {
        return lacontrolDAO.getAll(communityname);
    }

    @Override
    public Page<?> page(LacontrolDTO lacontrolDTO) {
        return lacontrolDAO.getAllLa(lacontrolDTO);
    }

    @Override
    public LacontrolPO getById(Long id) {
        return this.lacontrolDAO.getById(id);
    }
}
